package com.jt.demo7;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestPerson {
    public static void main(String[] args) {
        String resource="spring-di.xml";
        ApplicationContext context=
                new ClassPathXmlApplicationContext(resource);
        Person per = context.getBean(Person.class);
        per.togo();

    }
}
